package com.huawei.appgallery.agreementimpl.ui;

import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.view.MenuItem;
import com.huawei.appgallery.agreement.api.ui.ISignInfoActivityProtocol;
import com.huawei.appgallery.agreementimpl.view.activity.AbstractBaseActivity;
import com.huawei.hmf.annotation.ActivityDefine;
import o.axa.b;
import o.axa.c;
import o.axa.f;
import o.ayk;
import o.ayw;
import o.fiv;

@ActivityDefine(alias = "AgreementSignInfoActivity", protocol = ISignInfoActivityProtocol.class)
public class AgreementSignInfoActivity extends AbstractBaseActivity {
    private fiv ˏ = fiv.ॱ(this);

    public void onCreate(Bundle bundle) {
        ayw.ˋ((Activity) this, "LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES");
        super.onCreate(bundle);
        setContentView(f.ᐝ);
        getWindow().getDecorView().setBackgroundColor(getResources().getColor(c.ˏ));
        ॱ();
    }

    private void ॱ() {
        ISignInfoActivityProtocol iSignInfoActivityProtocol = (ISignInfoActivityProtocol) this.ˏ.ॱ();
        if (iSignInfoActivityProtocol != null) {
            FragmentTransaction beginTransaction = getFragmentManager().beginTransaction();
            Fragment o_ayk = new ayk();
            o_ayk.ˋ(iSignInfoActivityProtocol.isPrivacyOversea());
            beginTransaction.add(b.ˏ, o_ayk);
            beginTransaction.commit();
        }
    }

    public boolean onOptionsItemSelected(MenuItem menuItem) {
        if (menuItem.getItemId() != 16908332) {
            return super.onOptionsItemSelected(menuItem);
        }
        finish();
        return true;
    }
}
